package com.sqsf.util;

import com.sqsf.javabean.User;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.List;

public class MyBatisTest {

    public static void main(String[] args) {
        SqlSessionFactory factory = MyBatisUtil.getSqlSessionFactory();
        SqlSession session = factory.openSession(true);
        List<User> users = session.selectList("user.selectAllUser");
        for(User u:users){
            System.out.println(u);
        }
        session.close();
    }
}